﻿using System;
using EmbeddedSharp.Core;
using Zove.Runtime.Core;
using Zove.Runtime.Core.Expression;
using EmbeddedSharp.Scripting;

namespace Zove.Test
{
    public class MockContext : IContext
    {
        #region IContext Members

        public Node AddVariable(string var)
        {
            return null;
        }

        public void Run(string fileName)
        {
        }

        public Node GetVariable(string value)
        {
            FactorNode fn = new FactorNode();
            RuntimeFactor rf = new RuntimeFactor();
            rf.Name = value.ToString();
            rf.Initialize(1);
            fn.Factor = rf;

            return fn;
        }

        public Node Assign(string variableName, Node value)
        {
            return value;
        }

        public void RemoveVariable(string p)
        {
            return;
        }

        public object Evaluate(string input)
        {
            return input;
        }

        public bool HasVariable(string p)
        {
            return true;
        }

        public IExpressionParserFactory GetParserFactory()
        {
            throw new NotImplementedException();
        }

        public IFunctionManager GetFunctionManager()
        {
            throw new NotImplementedException();
        }

        public IUnaryFunctionFactory UnaryFunctionFactory
        {
            get { throw new NotImplementedException(); }
        }

        public void Clear()
        {
        }

        public void Push(StackFrame node)
        {
        }

        public StackFrame Pop()
        {
            return null;
        }
        #endregion

        #region IContext Members


        public Node Assign(string variableName, object value)
        {
            throw new NotImplementedException();
        }

        public Node AddVariable(string name, Node value)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IContext Members

        object IContext.GetVariable(string value)
        {
            throw new NotImplementedException();
        }

        object IContext.Assign(string variableName, object value)
        {
            throw new NotImplementedException();
        }

        object IContext.AddVariable(string name, object value)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IContext Members


        void IContext.RemoveVariable(string p)
        {
            throw new NotImplementedException();
        }

        object IContext.Evaluate(string input)
        {
            throw new NotImplementedException();
        }

        bool IContext.HasVariable(string p)
        {
            throw new NotImplementedException();
        }

        void IContext.Push(StackFrame frame)
        {
            throw new NotImplementedException();
        }

        StackFrame IContext.Pop()
        {
            throw new NotImplementedException();
        }

        IExpressionParserFactory IContext.GetParserFactory()
        {
            throw new NotImplementedException();
        }

        IFunctionManager IContext.GetFunctionManager()
        {
            throw new NotImplementedException();
        }

        IUnaryFunctionFactory IContext.UnaryFunctionFactory
        {
            get { throw new NotImplementedException(); }
        }

        void IContext.Clear()
        {
            throw new NotImplementedException();
        }

        void IContext.Run(string fileName)
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IDisposable Members

        void IDisposable.Dispose()
        {
            throw new NotImplementedException();
        }

        #endregion

        #region IContext Members


        public StackFrame Peep() {
            throw new NotImplementedException();
        }

        #endregion
    }
}
